package com.jungle.bfi.controller;

import com.jungle.base.domain.vo.JsonResult;
import com.jungle.bfi.domain.qo.ApiMetadataQo;
import com.jungle.bfi.entity.ApiMetadataPo;
import com.jungle.bfi.service.metadata.ApiMetadataService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("metadata")
public class MetadataController {
    @Resource
    private ApiMetadataService apiMetadataService;

    @PostMapping("findAll")
    public JsonResult<List<ApiMetadataPo>> findAll(@RequestBody ApiMetadataQo qo) {
        List<ApiMetadataPo> list = apiMetadataService.findAllWithChild(qo);
        return JsonResult.success(list);
    }

}
